package com.sdcs.server.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sdcs.server.daoimpl.StudentDaoImpl;
import com.sdcs.server.model.Student;

@Service
public class StudentService {
	@Autowired
	private StudentDaoImpl studentDaoImpl;

	public Student getStudent(String user_userid, String password) {
		return studentDaoImpl.getStudent(user_userid, password);
	}
	public boolean login(String userId, String password) {
		return studentDaoImpl.login(userId, password);
	}

	public boolean isExistsUser(String student_name) {
		return studentDaoImpl.isExistsUser(student_name);
	}

	public boolean insertUser(Student userTb) {
		return studentDaoImpl.insertUser(userTb);
	}

	public void delete(String id) {
		studentDaoImpl.delete(id);
	}

	public int getTotalCount() {
		return studentDaoImpl.getTotalCount();
	}

	public List<Student> getAll(int pageIndex, int pageSize) {
		return studentDaoImpl.getAll(pageIndex, pageSize);
	}

	public List<Student> getAll() {
		return studentDaoImpl.getAll();
	}
}
